package org.example.springoauth2.securitycommon.config.resource;

import org.example.springoauth2.securitycommon.config.InnerAspect;
import org.example.springoauth2.securitycommon.config.feign.CustomFeignClientConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author hzq
 * @since 2021-09-13
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@EnableResourceServer
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({AutoResourceServerConfiguration.class,
        InnerAspect.class,
        CustomFeignClientConfiguration.class})
public @interface EnableAutoResourceServerConfiguration {

}
